package com.csap.framework.oauth2.type;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 授权服务URL类型
 *
 * @Author ycf
 * @Date 2021/8/8 10:08 下午
 * @Version 1.0
 */
@AllArgsConstructor
@Getter
public enum Oauth2ServerType {
    /**
     * 授权服务器开放的接口地址
     */
    authorize("/oauth2/authorize", "Code授权码/隐藏式登录", "模式一：Code授权码/隐藏式登录"),
    token("/oauth2/token", "Code授权码/隐藏式登录", "" +
            "模式一：Code授权码 获取 Access-Token" +
            "Refresh-Token 刷新 Access-Token" +
            "模式三：密码式" +
            "模式四：凭证式"),
    register("/oauth2/register", "注册", "注册"),
    removeByOpenId("/oauth2/removeByOpenId", "根据opendId删除用户", "根据opendId删除用户"),
    loginRegister("/oauth2/loginRegister", "一键登录只支持账号密码", "一键登录只支持账号密码"),
    onekeyRegister("/oauth2/onekeyRegister", "一键登录只支持账号密码", "一键登录只支持账号密码"),
    loginRegisterMobile("/oauth2/loginRegisterMobile", "一键登录手机号登陆", "一键登录手机号登陆"),
    loginMobile("/oauth2/loginMobile", "手机号登陆", "手机号登陆"),
    userInfo("/oauth2/userInfo", "获取Userinfo信息", "获取Userinfo信息"),
    userInfoId("/oauth2/userInfoId", "获取Userinfo信息", "获取Userinfo信息"),
    updateByOpenId("/oauth2/updateByOpenId", "根据OpendId修改用户信息", "根据OpendId修改用户信息"),
    loginOut("/oauth2/loginOut", "退出登录", "退出登录"),
    logoutByOpenId("/oauth2/logoutByOpenId", "根据openid退出登录", "根据openid退出登录"),
    addPlatform("/oauth2/addPlatform", "添加平台", "添加平台"),
    updatePlatform("/oauth2/updatePlatform", "修改平台", "修改平台"),

    addRole("/roles/add", "添加角色", "添加角色"),
    updateRole("/roles/update", "修改角色", "修改角色"),
    removeRole("/roles/remove", "删除角色", "删除角色"),
    queryPageRole("/roles/queryPage", "分页查询角色", "分页查询角色"),
    rolesFindMapByIds("/roles/findMapByIds", "分页查询角色", "分页查询角色"),
    queryUserRoleNameByOpenId("/userRoles/queryUserRoleNameByOpenId", "分页查询角色", "分页查询角色"),

    queryUserRoleByOpenId("/userRoles/queryByOpenId", "根据openId查询用户端角色id", "根据openId查询用户端角色id"),
    saveOrUpdateUserPermissions("/userPermissions/saveOrUpdate", "添加用户角色权限", "添加用户角色权限"),
    addUserRole("/userRoles/add", "添加用户角色信息", "添加用户角色信息");

    private final String path;
    private final String name;
    private final String descr;
}
